package com.tianji.learning.controller;


import com.tianji.common.domain.dto.PageDTO;
import com.tianji.learning.domain.query.ReplyPageQuery;
import com.tianji.learning.domain.vo.ReplyVO;
import com.tianji.learning.service.IInteractionReplyService;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 互动问题的回答或评论 前端控制器
 * </p>
 *
 * @author 东哥
 * @since 2024-11-12
 */
@RestController
@RequestMapping("/admin/replies")
@RequiredArgsConstructor
public class InteractionReplyAdminController {
    private final IInteractionReplyService replyService;
    @PutMapping("/{id}/hidden/{hidden}")
    public void updateHiddenById(@PathVariable Long id, @PathVariable Boolean hidden){
        replyService.updateHiddenById(id, hidden);
    }
    @GetMapping("/page")
    public PageDTO<ReplyVO> pageQueryReplies(@RequestBody ReplyPageQuery query){
        return replyService.pageQueryReplies(query);
    }
}
